function f = tpq(x)
% Tridiagonal Perturbed Quadratic  Function   
%x0=[0.5, 0.5, ...,0.5]...  
%fmin=n/2,m=20
%Author:shi yangyang
n=length(x);
for i=1:n-2
    temp(i)=x(i)+x(i+1)+x(i+2);
end 
f=x(1)*x(1);
for i=2:n-1
    f=f+i*x(i)*x(i)+temp(i-1)^2;
end 
% f;
